"""HelloWorld URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/4.1/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""

from django.urls import path
from . import views
from . import experimentList
from . import routeView

urlpatterns = [
    # 获取实验详情
    path('getExperimentDetail/<int:experiment_id>', views.getExperimentDetail),

    # 频谱
    path('getSpectrumConfig/experimentId=<int:experiment_id>&consId=<int:cons_id>', views.getSpectrumConfig),
    path('saveSpectrumConfig', views.saveSpectrumConfig),

    # 星座组
    path('experiment/<int:experiment_id>/addConstellationGroup', views.addConstellationGroup),
    path('deleteConstellationGroupList', views.deleteConstellationGroupList),

    # 星座
    path('addConstellation', views.addConstellation),
    path('deleteConstellation', views.deleteConstellation),
    path('modifyConstellationName',views.modifyConstellationName),

    # 设备模板
    path('modifyNodeDeviceList', views.modifyNodeDeviceList),
    path('getDevicePattern/<int:experiment_id>', views.getDevicePattern),
    path('modifyDevicePattern',views.modifyDevicePattern),
    path('deleteDevicePattern',views.deleteDevicePattern),

    # 区域
    path('modifyGroundRegionAndTerminal', views.modifyGroundRegionAndTerminal),
    path('deleteGroundRegionAndTerminal', views.deleteGroundRegionAndTerminal),

    # 节点
    path('modifyNode', views.modifyNode),
    path('deleteNodeList', views.deleteNodeList),
    path('getNodeInfo', views.getNodeInfo),
    path('getDefaultConfig/<int:config_id>',views.getDefaultConfig),

    # 登录
    path('user/login', experimentList.login),
    path('user/register', experimentList.register),
    path('getExperimentList/<int:user_id>', experimentList.getExperimentList),
    path('createGroup', experimentList.createGroup),
    path('modifyGroup', experimentList.modifyGroup),
    path('deleteGroup', experimentList.deleteGroup),
    path('modifyExperiment', experimentList.modifyExperiment),

    # 业务对
    path('getRegionPairList/<int:experiment_id>',views.getRegionPairList),
    path('createRegionPairs',views.createRegionPairs),

    # 路由
    path('getRouteList/<int:experiment_id>',routeView.getRouteList),
    path('saveRouteConfig', routeView.saveRouteConfig),
    path('deleteRouteConfig', routeView.deleteRouteConfig),
]
